(find_interval): Don't rebalance during signal handling.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 12 Apr 2001 12:13:19 +0000 (12:13 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 12 Apr 2001 12:13:19 +0000 (12:13 +0000)
src/intervals.c

index 3e15a3cbf41d2c20d54495903df1a939eaaae29a..1dfc901a3ec655d29e45035e722aa36690a4a60c 100644 (file)
@@ -612,7 +612,8 @@ find_interval (tree, position)
   if (relative_position > TOTAL_LENGTH (tree))
     abort ();                  /* Paranoia */
 
-  tree = balance_possible_root_interval (tree);
+  if (!handling_signal)
+    tree = balance_possible_root_interval (tree);
 
   while (1)
     {
@@ -720,7 +721,9 @@ previous_interval (interval)
 
 /* Find the interval containing POS given some non-NULL INTERVAL
    in the same tree.  Note that we need to update interval->position
-   if we go down the tree.  */
+   if we go down the tree.
+   To speed up the process, we assume that the ->position of
+   I and all its parents is already uptodate.  */
 INTERVAL
 update_interval (i, pos)
      register INTERVAL i;